package com.spic.system.controller;

import com.spic.common.core.web.domain.AjaxResult;
import com.spic.system.service.AppVersionService;
import com.spic.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 检测网络,并获取app最新版本信息
 *
 * @author ruoyi
 */
@RestController
public class CheckIntNetController {

    @Autowired
    private AppVersionService appVersionService;

    /**
     * 检测网络,并获取app最新版本信息比较需不需要升级
     * @param version app端版本
     * @return
     */
    @GetMapping("/checkIntNet")
    public AjaxResult checkIntNet(@RequestParam("version") String version)
    {
        return AjaxResult.success(appVersionService.getAppVersion(version));
    }

    @GetMapping("/app/update")
    public AjaxResult checkApp4update(String version,String type){
        return AjaxResult.success();
    }
}
